﻿using System;
using System.Collections.Generic;
using System.Linq;
using Xinkui.WebModel.BasicControl;
using Xinkui.WebModel.Model;

public partial class UserControl_ShowRoom_UC_Contact : ShowRoomControl {
    protected void Page_Load(object sender, EventArgs e) {

        List<PropertyItem> properies = new List<PropertyItem>();

        properies.Add(new PropertyItem {
            Title = "Company Name",
            Value = this.CompanyView.CompanyEntity.CompanyName,
            OrderBy = 1
        });

        properies.Add(new PropertyItem {
            Title = "Business Phone",
            Value = this.CompanyView.CompanyEntity.PhoneNum,
            OrderBy = 2
        });

        properies.Add(new PropertyItem {
            Title = "Business Fax",
            Value = this.CompanyView.CompanyEntity.FaxNum,
            OrderBy = 3
        });

        properies.Add(new PropertyItem {
            Title = "Street Address",
            Value = this.CompanyView.CompanyEntity.StreetAddress,
            OrderBy = 4
        });

        properies.Add(new PropertyItem {
            Title = "City / Province",
            Value = this.CompanyView.City,
            OrderBy = 5
        });

        properies.Add(new PropertyItem {
            Title = "Province / State",
            Value = this.CompanyView.Province,
            OrderBy = 6
        });

        properies.Add(new PropertyItem {
            Title = "Zip / Postal Code",
            Value = this.CompanyView.CompanyEntity.PostCode
            ,
            OrderBy = 7
        });

        properies.Add(new PropertyItem {
            Title = "Country / Region",
            Value = this.CompanyView.CountryName
         ,
            OrderBy = 8
        });

        properies.Add(new PropertyItem {
            Title = "WebSite",
            Value = this.CompanyView.CompanyEntity.WebSite
      ,
            OrderBy = 9
        });
        properies.Add(new PropertyItem {
            Title = "Contact Person",
            Value = string.Concat(this.CompanyView.UserEntity.FirstName, this.CompanyView.UserEntity.LastName)
    ,
            OrderBy = 10
        });

        properies.Add(new PropertyItem {
            Title = "Mobile",
            Value = this.CompanyView.UserEntity.Mobile
   ,
            OrderBy = 11
        });
        properies.Add(new PropertyItem {
            Title = "Department",
            Value = this.CompanyView.UserEntity.Department
   ,
            OrderBy = 11
        });

        rptProperties.DataSource = properies;
        rptProperties.DataBind();
    }
}